package entities;

import java.awt.image.BufferedImage;

public abstract class FlyingObject {
    //生命值,大伙都有
    private int HP;
    //x,y位置，图片，图片宽、高
    private int x, y, p_width, p_height;
    private BufferedImage appearance;
    //分数，没有分数的设为0
    private int score;

    public FlyingObject() {
    }

    public FlyingObject(int HP, int x, int y, BufferedImage appearance, int score) {
        this.HP = HP;
        this.x = x;
        this.y = y;
        this.appearance = appearance;
        this.score = score;
    }

    //抽象方法：移动
    public abstract void move();

    @Override
    public String toString() {
        return "FlyingObject{" +
                "HP=" + HP +
                ", x=" + x +
                ", y=" + y +
                ", p_width=" + p_width +
                ", p_height=" + p_height +
                ", appearance=" + appearance +
                ", score=" + score +
                '}';
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public int getHP() {
        return HP;
    }

    public void setHP(int HP) {
        this.HP = HP;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getP_width() {
        return p_width;
    }

    public void setP_width(int p_width) {
        this.p_width = p_width;
    }

    public int getP_height() {
        return p_height;
    }

    public void setP_height(int p_height) {
        this.p_height = p_height;
    }

    public BufferedImage getAppearance() {
        return appearance;
    }

    public void setAppearance(BufferedImage appearance) {
        this.appearance = appearance;
    }
}
